Some applications require the use of a sinusoidal input signal at a predetermined level of precision. For example, some calibration processes may necessitate the use of a sinusoidal input as a reference signal for calibration purposes. Some microcontrollers may be able to generate, or assist in the generation of, the desired sinusoidal signal.
In one example, a microcontroller generates a 50% duty cycle pulse train at the desired frequency. The pulse train is then low-pass filtered in an attempt to filter out all harmonics except for the desired fundamental frequency. For the generation of relatively low frequency sinusoids, however, the frequency spacing between the harmonic signal content is close enough so as to necessitate a relatively high order low pass filter. For example, if a 7.8125 Hz sinewave is desired, the spacing between the fundamental frequency at 7.8125 and the third harmonic, fifth harmonic, and so on is only 15.625 Hz (double the 7.8125 Hz fundamental frequency). Further, the amplitude of the various harmonics are fairly large and may not be much smaller than the amplitude of the fundamental frequency. As a result of the tight spacing in the frequency domain between the desired fundamental frequency and the undesirable closest harmonics (i.e., third and fifth harmonics), a higher order filter such as an eighth order, elliptic filter may be needed to sufficiently recover the fundamental frequency and generate the desired sine wave.
The use of such high order filters is expensive in terms of area on the circuit board or substrate and adds to the power consumption of the device.